#pragma once

#include "Controller.h"

#include <boost/signal.hpp>
#include "AccusationController.h"
#include "BoardController.h"
#include "DeductionController.h"

#include "../domain/models/CardsCollection.h"
#include "../domain/models/Player.h"
#include "../views/abstract/IAccusationView.h"

namespace Controllers {

	class TurnController: public Controller
	{
		AccusationController accusation_controller;
		BoardController board_controller;
		DeductionController deduction_controller;

	public:
		boost::signal<void ()> turnEndEvent;
		boost::signal<void ()> gameWinEvent;

		TurnController(Players::Player* current_player, Players::PlayersQueue players, 
			Cards::CardsCollection cards, Cards::CardSet searched_cards);
		void begin();
	protected:
		void performAccusation();
		void onAccusationCorrect();
		void performMove();
		void performDeduction();
		void end();
	};

}

